

#include "typedefs.h"
#include "dv_api.h"

#if 1
//Init
#ifdef TW8823EVB
CODE BYTE Table_Inital[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_EVB\Table_INIT_AT070TN83V3(EVB).txt"
	//#include "Data\AT070TN83V3_EVB\test_F.txt"
	//#include "Data\AT070TN83V3_EVB\test2_Pal_F.txt"
	0xff, 0xfe,
	0x8a, 0,
	#include "Data\Table_INIT_TW9900.txt"
	0xff, 0xff
};
#endif

//SH-DEMO
#ifdef TW8823SHDEMO
#ifdef TW8823INNOLUX
CODE BYTE Table_Inital[] =
{
	0x00, 0,
//	#include "Data\AT070TN83V3_SHDEMO\Table_INIT_AT070TN83V3(SHDEMO).txt"
	#include "Data\AT070TN83V3_SHDEMO\Table_INIT_AT070TN83V3(SHDEMO)_3.txt"

	0xff, 0xfe,
	0x8a, 0,
	#include "Data\Table_INIT_TW9900.txt"
	0xff, 0xff
};
#endif

#ifdef TW8823HANSTAR
CODE BYTE Table_Inital[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_INIT_HLY070ML232(SHDEMO).txt"
	0xff, 0xfe,
	0x8a, 0,
	#include "Data\Table_INIT_TW9900.txt"
	0xff, 0xff
};
#endif
#endif

#endif

//Inport table
#if 1
CODE BYTE Table_INPORT_CVBS0[] = {
	0x00, 0,
	0xff, 0x01,
	0x02, 0x40,
	0xff, 0xff
};

CODE BYTE Table_INPORT_CVBS1[] = {
	0x00, 0,
	0xff, 0x01,
	0x02, 0x44,
	0xff, 0xff
};

CODE BYTE Table_INPORT_CVBS2[] = {
	0x00, 0,
	0xff, 0x01,
	0x02, 0x48,
	0xff, 0xff
};

CODE BYTE Table_INPORT_CVBS3[] = {
	0x00, 0,
	0xff, 0x01,
	0x02, 0x4C,
	0xff, 0xff
};

CODE BYTE Table_INPORT_YC[] = {
	0x00, 0,
	0xff, 0x01,
	0x02, 0x54,
	0xff, 0xff
};

CODE BYTE Table_INPORT_DTV1[] = {
	0x00, 0,
	0xff, 0xff
};

CODE BYTE Table_INPORT_DTV2_BT656[] = {
	0x00, 0,
	0xff, 0xff
};

CODE BYTE Table_INPORT_ARGB_HV[] = {
	0x00, 0,
	0xff, 0x02,
	0x02, 0x00,
	0xc0, 0x08,
	0xcb, 0x55,
	0xff, 0xff
};

CODE BYTE Table_INPORT_ARGB_SOG[] = {
	0x00, 0,
	0xff, 0x02,
	0x02, 0x01,
	0xc0, 0x10,
	0xcb, 0xf5,
	0xff, 0xff
};


CODE BYTE Table_INPORT_EXCVBS0[] = {
	0x00, 0,
	0xff, 0xfe,
	0x8a, 0,
	0x02, 0x40,
	0xff, 0xff
};

CODE BYTE Table_INPORT_EXYC[] = {
	0x00, 0,
	0xff, 0xfe,
	0x8a, 0,
	0x02, 0x54,
	0xff, 0xff
};

#endif

//Outport table
#if 1
CODE BYTE Table_OUTPORT_MAIN[] = {
	0x00, 0,
	0xff, 0xff
};

CODE BYTE Table_OUTPORT_PIP0[] = {
	0x00, 0,
	0xff, 0xff
};

CODE BYTE Table_OUTPORT_PIP1[] = {
	0x00, 0,
	0xff, 0xff
};
#endif

//Format table
#if 1
CODE BYTE Table_SIGFMT_NTSC[] = {
	0x00, 0,
	#include "Data\Table_NTSC_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_PAL[] = {
	0x00, 0,
	#include "Data\Table_PAL_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_YUV480i[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_YUV576i[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_YUV480p[] = {
	0x00, 0,
	#include "Data\Table_YUV480p_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_YUV576p[] = {
	0x00, 0,
	#include "Data\Table_YUV576p_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_SVGA60[] = {
	0x00, 0,
	#include "Data\Table_SVGA60_FMT.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_DTV480i[] = {
	0x8a, 0,
	#include "Data\Table_NTSC_TW9900.txt"
	0xff, 0xff
};

CODE BYTE Table_SIGFMT_DTV576i[] = {
	0x8a, 0,
	#include "Data\Table_PAL_TW9900.txt"
	0xff, 0xff
};
#endif


//Scale table
#ifdef TW8823INNOLUX
#if 1
CODE BYTE Table_NTSC_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_NTSC_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_PAL_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV480i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV576i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV480p_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV576p_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_SVGA60_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_DTV2480i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_M_FULL[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_DTV2576i_MAIN_FULL.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_NTSC_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_NTSC_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_PAL_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV480i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV576i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV480p_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_YUV576p_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_SVGA60_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_DTV2480i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_M_HALF[] = {
	0x00, 0,
	#include "Data\AT070TN83V3_SHDEMO\Table_DTV2576i_MAIN_HALF.txt"
	0xff, 0xff
};
#endif
#endif




#ifdef TW8823HANSTAR
#if 1
CODE BYTE Table_NTSC_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_NTSC_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_PAL_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV480i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV576i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV480p_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV576p_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_SVGA60_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_DTV2480i_MAIN_FULL.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_M_FULL[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_DTV2576i_MAIN_FULL.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_NTSC_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_NTSC_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_PAL_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV480i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV576i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV480p_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_YUV576p_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_SVGA60_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_DTV2480i_MAIN_HALF.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_M_HALF[] = {
	0x00, 0,
	#include "Data\HLY070ML232_SHDEMO\Table_DTV2576i_MAIN_HALF.txt"
	0xff, 0xff
};
#endif
#endif






#if 1
#if 1
CODE BYTE Table_NTSC_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_NTSC_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_PAL_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_YUV480p_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_YUV576p_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_SVGA60_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_DTV2480i_PIP0_S.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_S0_SMALL[] = {
	0x00, 0,
	#include "Data\Table_DTV2576i_PIP0_S.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_NTSC_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_NTSC_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_PAL_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_YUV480p_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_YUV576p_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_SVGA60_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_DTV2480i_PIP0_M.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_S0_MIDDLE[] = {
	0x00, 0,
	#include "Data\Table_DTV2576i_PIP0_M.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_NTSC_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_NTSC_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_PAL_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_YUV480p_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_YUV576p_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_SVGA60_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_DTV2480i_PIP0_L.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_S0_LARGE[] = {
	0x00, 0,
	#include "Data\Table_DTV2576i_PIP0_L.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_NTSC_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_NTSC_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_PAL_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_PAL_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480I_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV480P_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_YUV480p_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576P_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_YUV576p_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_SVGA60_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_SVGA60_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2480I_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_DTV2480i_PIP0_H.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_S0_POP[] = {
	0x00, 0,
	#include "Data\Table_DTV2576i_PIP0_H.txt"
	0xff, 0xff
};
#endif

#if 1
CODE BYTE Table_DTV2480I_S0_DUAL[] = {
	0x00, 0,
	#include "Data\Table_DTV2480i_PIP0_D.txt"
	0xff, 0xff
};

CODE BYTE Table_DTV2576I_S0_DUAL[] = {
	0x00, 0,
	#include "Data\Table_DTV2576i_PIP0_D.txt"
	0xff, 0xff
};
#endif

#endif

#if 1
CODE BYTE Table_YUV480I_S1_DUAL[] = {
	0x00, 0,
	#include "Data\Table_YUV480i_PIP1_D.txt"
	0xff, 0xff
};

CODE BYTE Table_YUV576I_S1_DUAL[] = {
	0x00, 0,
	#include "Data\Table_YUV576i_PIP1_D.txt"
	0xff, 0xff
};
#endif


